package com.xxx.common;

public class IdWorkerManage {

	private static IdWorker idWorkerInstance = null;

	/**
	 * single 单例模式
	 * @return
	 */
	private static synchronized IdWorker getIdWorkerInstance() {
		if (idWorkerInstance == null) {
			idWorkerInstance = new IdWorker();
		}
		return idWorkerInstance;
	}

	public static long getId() throws Exception {
		return getIdWorkerInstance().getId("cmh");
	}

}
